<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
    <title>Donxon SDK Docs</title>
    <link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

<div id="container">

<div id="product">
	<div id="product_logo"></div>
	<div id="product_name"><big><b></b></big></div>
	<div id="product_description"></div>
</div> <!-- id="product" -->


<div id="main">


<!-- Menu -->

<div id="navigation">
<br/>
<h1>Donxon SDK</h1>

<ul>
  <li><a href="../index.html">Index</a></li>
</ul>

<h2>Contents</h2>
<ul>
<li><a href="#Data_Structures">Data Structures</a></li>
<li><a href="#Methods">Methods</a></li>
</ul>


<h2>Classes</h2>
<ul class="nowrap">
  <li><a href="../classes/Debug.html">Debug</a></li>
  <li><a href="../classes/StringBuffer.html">StringBuffer</a></li>
  <li><a href="../classes/Hook.html">Hook</a></li>
  <li><a href="../classes/System.UTF8.html">System.UTF8</a></li>
  <li><a href="../classes/Common.Color.html">Common.Color</a></li>
  <li><a href="../classes/Common.Vector2D.html">Common.Vector2D</a></li>
  <li><a href="../classes/Common.Vector.html">Common.Vector</a></li>
  <li><a href="../classes/Common.NetMessage.html">Common.NetMessage</a></li>
  <li><a href="../classes/Common.TextMenu.html">Common.TextMenu</a></li>
  <li><a href="../classes/Common.ScreenFade.html">Common.ScreenFade</a></li>
  <li><a href="../classes/Common.HUDText.html">Common.HUDText</a></li>
  <li><strong>Game.NetMessage</strong></li>
  <li><a href="../classes/Game.TextMenu.html">Game.TextMenu</a></li>
  <li><a href="../classes/Game.ScreenFade.html">Game.ScreenFade</a></li>
  <li><a href="../classes/Game.BarTime.html">Game.BarTime</a></li>
  <li><a href="../classes/UI.Rectangle.html">UI.Rectangle</a></li>
  <li><a href="../classes/UI.ProgressBar.html">UI.ProgressBar</a></li>
  <li><a href="../classes/UI.TextMenu.html">UI.TextMenu</a></li>
  <li><a href="../classes/UI.ScreenFade.html">UI.ScreenFade</a></li>
  <li><a href="../classes/UI.BarTime.html">UI.BarTime</a></li>
</ul>
<h2>Globals</h2>
<ul class="nowrap">
  <li><a href="../globals/Properties.html">Properties</a></li>
  <li><a href="../globals/Functions.html">Functions</a></li>
  <li><a href="../globals/Classes.html">Classes</a></li>
</ul>
<h2>Modules</h2>
<ul class="nowrap">
  <li><a href="../modules/System.html">System</a></li>
  <li><a href="../modules/Common.html">Common</a></li>
  <li><a href="../modules/Game.html">Game</a></li>
  <li><a href="../modules/UI.html">UI</a></li>
</ul>
<h2>Topics</h2>
<ul class="">
  <li><a href="../topics/changelog.md.html">changelog</a></li>
  <li><a href="../topics/credit.md.html">credit</a></li>
  <li><a href="../topics/license.html">license</a></li>
</ul>
<h2>Examples</h2>
<ul class="nowrap">
  <li><a href="../examples/bartime.game.lua.html">bartime.game.lua</a></li>
  <li><a href="../examples/bartime.ui.lua.html">bartime.ui.lua</a></li>
  <li><a href="../examples/deltatiming.game.lua.html">deltatiming.game.lua</a></li>
  <li><a href="../examples/deltatiming.ui.lua.html">deltatiming.ui.lua</a></li>
  <li><a href="../examples/hook.game.lua.html">hook.game.lua</a></li>
  <li><a href="../examples/netmsg.simple.common.lua.html">netmsg.simple.common.lua</a></li>
  <li><a href="../examples/netmsg.simple.game.lua.html">netmsg.simple.game.lua</a></li>
  <li><a href="../examples/netmsg.simple.ui.lua.html">netmsg.simple.ui.lua</a></li>
  <li><a href="../examples/progressbar.ui.lua.html">progressbar.ui.lua</a></li>
  <li><a href="../examples/rectangle.ui.lua.html">rectangle.ui.lua</a></li>
  <li><a href="../examples/screenfade.game.lua.html">screenfade.game.lua</a></li>
  <li><a href="../examples/screenfade.ui.lua.html">screenfade.ui.lua</a></li>
  <li><a href="../examples/stringbuffer.lua.html">stringbuffer.lua</a></li>
  <li><a href="../examples/textmenu.simple.game.lua.html">textmenu.simple.game.lua</a></li>
  <li><a href="../examples/utf8.lua.html">utf8.lua</a></li>
  <li><a href="../examples/vector.2d.lua.html">vector.2d.lua</a></li>
  <li><a href="../examples/vector.3d.lua.html">vector.3d.lua</a></li>
</ul>

</div>

<div id="content">

<h1>Class <code>Game.NetMessage</code></h1>
<p>Network Message Sender class.</p>
<p> To sends messages to clients.</p>


<h2><a href="#Data_Structures">Data Structures</a></h2>
<table class="function_list">
	<tr>
	<td class="name" nowrap><a href="#.netMessageBeginOption">.netMessageBeginOption</a></td>
	<td class="summary">The <a href="../classes/Game.NetMessage.html#Game.NetMessage:Begin">Game.NetMessage:Begin</a> options.</td>
	</tr>
</table>
<h2><a href="#Methods">Methods</a></h2>
<table class="function_list">
	<tr>
	<td class="name" nowrap><a href="#Game.NetMessage:Begin">Game.NetMessage:Begin (dest, msg[, origin[, ent]])</a></td>
	<td class="summary">Marks the beginning of a client message.</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#Game.NetMessage:End">Game.NetMessage:End ()</a></td>
	<td class="summary">Ends the message and sends the message.</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#Game.NetMessage:Clear">Game.NetMessage:Clear ()</a></td>
	<td class="summary">Clears the message buffers to make them available to send another message.</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#Game.NetMessage:WriteByte">Game.NetMessage:WriteByte (value)</a></td>
	<td class="summary">Writes a byte to the buffer.</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#Game.NetMessage:WriteChar">Game.NetMessage:WriteChar (value)</a></td>
	<td class="summary">Writes a character to the buffer.</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#Game.NetMessage:WriteShort">Game.NetMessage:WriteShort (value)</a></td>
	<td class="summary">Writes a short to the buffer.</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#Game.NetMessage:WriteLong">Game.NetMessage:WriteLong (value)</a></td>
	<td class="summary">Writes a long to the buffer.</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#Game.NetMessage:WriteAngle">Game.NetMessage:WriteAngle (value)</a></td>
	<td class="summary">Writes an angle to the buffer.</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#Game.NetMessage:WriteCoord">Game.NetMessage:WriteCoord (value)</a></td>
	<td class="summary">Writes a coordinate to the buffer.</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#Game.NetMessage:WriteVector">Game.NetMessage:WriteVector (value[, asVector=false])</a></td>
	<td class="summary">Writes a vector to the buffer.</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#Game.NetMessage:WriteString">Game.NetMessage:WriteString (value)</a></td>
	<td class="summary">Writes a string to the buffer.</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#Game.NetMessage:WriteEntity">Game.NetMessage:WriteEntity (value)</a></td>
	<td class="summary">Writes an entity index to the buffer.</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#Game.NetMessage:WriteFloat">Game.NetMessage:WriteFloat (value)</a></td>
	<td class="summary">Writes a float to the buffer.</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#Game.NetMessage:WriteNumber">Game.NetMessage:WriteNumber (value)</a></td>
	<td class="summary">Writes a lua_Number to the buffer.</td>
	</tr>
</table>

<br/>
<br/>


    <h2 class="section-header "><a name="Data_Structures"></a>Data Structures</h2>

    <dl class="function">
    <dt>
    <a name = ".netMessageBeginOption"></a>
    <strong>.netMessageBeginOption</strong>
    </dt>
    <dd>
    The <a href="../classes/Game.NetMessage.html#Game.NetMessage:Begin">Game.NetMessage:Begin</a> options.


    <ul>
        <li><span class="parameter">destination</span>
            <span class="types"><a class="type" href="../classes/Common.NetMessage.html#Common.NetMessage.MSG">Common.NetMessage.MSG</a></span>
         The destination type.
        </li>
        <li><span class="parameter">message</span>
            <span class="types"><a class="type" href="../classes/Common.NetMessage.html#Common.NetMessage.TYPE">Common.NetMessage.TYPE</a> or <a class="type" href="../classes/Common.NetMessage.html#">Common.NetMessage</a></span>
         The network message builder instance.
        </li>
        <li><span class="parameter">position</span>
            <span class="types"><a class="type" href="../classes/Common.Vector.html#">Common.Vector</a> or <a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
         The message's position on map.
         (<em>optional</em>)
        </li>
        <li><span class="parameter">player</span>
            <span class="types"><span class="type">number</span> or <span class="type">Game.Entity</span></span>
         The player index receiving the message (0 = all players).
         (<em>optional</em>)
        </li>
    </ul>





</dd>
</dl>
    <h2 class="section-header "><a name="Methods"></a>Methods</h2>

    <dl class="function">
    <dt>
    <a name = "Game.NetMessage:Begin"></a>
    <strong>Game.NetMessage:Begin (dest, msg[, origin[, ent]])</strong>
    </dt>
    <dd>
    Marks the beginning of a client message.


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">dest</span>
            <span class="types"><a class="type" href="../classes/Common.NetMessage.html#Common.NetMessage.MSG">Common.NetMessage.MSG</a> or <a class="type" href="../classes/Game.NetMessage.html#.netMessageBeginOption">.netMessageBeginOption</a></span>
         The destination type. | Options table.
        </li>
        <li><span class="parameter">msg</span>
            <span class="types"><a class="type" href="../classes/Common.NetMessage.html#Common.NetMessage.TYPE">Common.NetMessage.TYPE</a> or <a class="type" href="../classes/Common.NetMessage.html#">Common.NetMessage</a></span>
         The network message builder instance (Ignored if <code>dest</code> is a table).
        </li>
        <li><span class="parameter">origin</span>
            <span class="types"><a class="type" href="../classes/Common.Vector.html#">Common.Vector</a> or <a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
         The message's position on world (Ignored if <code>dest</code> is a table).
         (<em>optional</em>)
        </li>
        <li><span class="parameter">ent</span>
            <span class="types"><span class="type">number</span> or <span class="type">Game.Entity</span></span>
         The player index receiving the message (0 = all players)(Ignored if <code>dest</code> is a table).
         (<em>optional</em>)
        </li>
    </ul>

    <h3>Returns:</h3>
    <ol>

           <span class="types"><a class="type" href="../classes/Game.NetMessage.html#">Game.NetMessage</a></span>
        Returns this class for fluent interface.
    </ol>


    <h3>See also:</h3>
    <ul>
         <a href="../classes/Common.NetMessage.html#Common.NetMessage:Register">Common.NetMessage:Register</a>
    </ul>


</dd>
    <dt>
    <a name = "Game.NetMessage:End"></a>
    <strong>Game.NetMessage:End ()</strong>
    </dt>
    <dd>
    Ends the message and sends the message. </p>

<p> Automatically clears the message buffers.



    <h3>Returns:</h3>
    <ol>

           <span class="types"><a class="type" href="../classes/Game.NetMessage.html#">Game.NetMessage</a></span>
        Returns this class for fluent interface.
    </ol>


    <h3>See also:</h3>
    <ul>
         <li><a href="../classes/Common.NetMessage.html#Common.NetMessage:OnSent">Common.NetMessage:OnSent</a></li>
         <li><a href="../classes/Common.NetMessage.html#Common.NetMessage:OnReceived">Common.NetMessage:OnReceived</a></li>
    </ul>


</dd>
    <dt>
    <a name = "Game.NetMessage:Clear"></a>
    <strong>Game.NetMessage:Clear ()</strong>
    </dt>
    <dd>
    Clears the message buffers to make them available to send another message.



    <h3>Returns:</h3>
    <ol>

           <span class="types"><a class="type" href="../classes/Game.NetMessage.html#">Game.NetMessage</a></span>
        Returns this class for fluent interface.
    </ol>




</dd>
    <dt>
    <a name = "Game.NetMessage:WriteByte"></a>
    <strong>Game.NetMessage:WriteByte (value)</strong>
    </dt>
    <dd>
    Writes a byte to the buffer.


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">value</span>
            <span class="types"><span class="type">number</span></span>
         An unsigned char value.
        </li>
    </ul>

    <h3>Returns:</h3>
    <ol>

           <span class="types"><a class="type" href="../classes/Game.NetMessage.html#">Game.NetMessage</a></span>
        Returns this class for fluent interface.
    </ol>




</dd>
    <dt>
    <a name = "Game.NetMessage:WriteChar"></a>
    <strong>Game.NetMessage:WriteChar (value)</strong>
    </dt>
    <dd>
    Writes a character to the buffer.


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">value</span>
            <span class="types"><span class="type">number</span> or <a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
         A signed char value.
        </li>
    </ul>

    <h3>Returns:</h3>
    <ol>

           <span class="types"><a class="type" href="../classes/Game.NetMessage.html#">Game.NetMessage</a></span>
        Returns this class for fluent interface.
    </ol>




</dd>
    <dt>
    <a name = "Game.NetMessage:WriteShort"></a>
    <strong>Game.NetMessage:WriteShort (value)</strong>
    </dt>
    <dd>
    Writes a short to the buffer.


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">value</span>
            <span class="types"><span class="type">number</span></span>
         A signed short value.
        </li>
    </ul>

    <h3>Returns:</h3>
    <ol>

           <span class="types"><a class="type" href="../classes/Game.NetMessage.html#">Game.NetMessage</a></span>
        Returns this class for fluent interface.
    </ol>




</dd>
    <dt>
    <a name = "Game.NetMessage:WriteLong"></a>
    <strong>Game.NetMessage:WriteLong (value)</strong>
    </dt>
    <dd>
    Writes a long to the buffer.


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">value</span>
            <span class="types"><span class="type">number</span></span>
         A signed long value.
        </li>
    </ul>

    <h3>Returns:</h3>
    <ol>

           <span class="types"><a class="type" href="../classes/Game.NetMessage.html#">Game.NetMessage</a></span>
        Returns this class for fluent interface.
    </ol>




</dd>
    <dt>
    <a name = "Game.NetMessage:WriteAngle"></a>
    <strong>Game.NetMessage:WriteAngle (value)</strong>
    </dt>
    <dd>
    Writes an angle to the buffer. </p>

<p> This is low-res angle.


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">value</span>
            <span class="types"><span class="type">number</span></span>
         A float value.
        </li>
    </ul>

    <h3>Returns:</h3>
    <ol>

           <span class="types"><a class="type" href="../classes/Game.NetMessage.html#">Game.NetMessage</a></span>
        Returns this class for fluent interface.
    </ol>


    <h3>See also:</h3>
    <ul>
         <a href="../classes/Common.NetMessage.html#Common.NetMessage:ToFormatType">Common.NetMessage:ToFormatType</a>
    </ul>


</dd>
    <dt>
    <a name = "Game.NetMessage:WriteCoord"></a>
    <strong>Game.NetMessage:WriteCoord (value)</strong>
    </dt>
    <dd>
    Writes a coordinate to the buffer.


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">value</span>
            <span class="types"><span class="type">number</span></span>
         A float value.
        </li>
    </ul>

    <h3>Returns:</h3>
    <ol>

           <span class="types"><a class="type" href="../classes/Game.NetMessage.html#">Game.NetMessage</a></span>
        Returns this class for fluent interface.
    </ol>




</dd>
    <dt>
    <a name = "Game.NetMessage:WriteVector"></a>
    <strong>Game.NetMessage:WriteVector (value[, asVector=false])</strong>
    </dt>
    <dd>
    Writes a vector to the buffer.


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">value</span>
            <span class="types"><a class="type" href="../classes/Common.Vector.html#">Common.Vector</a> or <a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
         A 3D vector table value.
        </li>
        <li><span class="parameter">asVector</span>
            <span class="types"><span class="type">bool</span></span>
         Writes as vector value.
         (<em>default</em> false)
        </li>
    </ul>

    <h3>Returns:</h3>
    <ol>

           <span class="types"><a class="type" href="../classes/Game.NetMessage.html#">Game.NetMessage</a></span>
        Returns this class for fluent interface.
    </ol>




</dd>
    <dt>
    <a name = "Game.NetMessage:WriteString"></a>
    <strong>Game.NetMessage:WriteString (value)</strong>
    </dt>
    <dd>
    Writes a string to the buffer.


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">value</span>
            <span class="types"><span class="type">number</span></span>
         A string value.
        </li>
    </ul>

    <h3>Returns:</h3>
    <ol>

           <span class="types"><a class="type" href="../classes/Game.NetMessage.html#">Game.NetMessage</a></span>
        Returns this class for fluent interface.
    </ol>




</dd>
    <dt>
    <a name = "Game.NetMessage:WriteEntity"></a>
    <strong>Game.NetMessage:WriteEntity (value)</strong>
    </dt>
    <dd>
    Writes an entity index to the buffer.


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">value</span>
            <span class="types"><span class="type">number</span> or <span class="type">Game.Entity</span></span>
         An entity index.
        </li>
    </ul>

    <h3>Returns:</h3>
    <ol>

           <span class="types"><a class="type" href="../classes/Game.NetMessage.html#">Game.NetMessage</a></span>
        Returns this class for fluent interface.
    </ol>




</dd>
    <dt>
    <a name = "Game.NetMessage:WriteFloat"></a>
    <strong>Game.NetMessage:WriteFloat (value)</strong>
    </dt>
    <dd>
    Writes a float to the buffer. </p>

<p> Same as <a href="../classes/Game.NetMessage.html#Game.NetMessage:WriteCoord">Game.NetMessage:WriteCoord</a>.


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">value</span>
            <span class="types"><span class="type">number</span></span>
         A float value.
        </li>
    </ul>

    <h3>Returns:</h3>
    <ol>

           <span class="types"><a class="type" href="../classes/Game.NetMessage.html#">Game.NetMessage</a></span>
        Returns this class for fluent interface.
    </ol>




</dd>
    <dt>
    <a name = "Game.NetMessage:WriteNumber"></a>
    <strong>Game.NetMessage:WriteNumber (value)</strong>
    </dt>
    <dd>
    Writes a lua_Number to the buffer.


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">value</span>
            <span class="types"><span class="type">number</span></span>
         A lua_Number value.
        </li>
    </ul>

    <h3>Returns:</h3>
    <ol>

           <span class="types"><a class="type" href="../classes/Game.NetMessage.html#">Game.NetMessage</a></span>
        Returns this class for fluent interface.
    </ol>




</dd>
</dl>


</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-06-15 21:15:36 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>
